import {
  $ as D,
  x as V,
  r as N,
  i as n,
  Q as R,
  o as c,
  a as j,
  w as E,
  k as O,
  l,
  m as e,
  e as u,
  b as g,
  P as _,
  z as x
} from './index-abba05ce.js';

const z = {
  saveSetting: async function(m) {
    return await D.post('plugin/copyright/admin.Copyright/config', m);
  }
};

const G = { class: 'storage' };
const L = { style: { width: '45%' } };
const P = { style: { width: '45%' } };

const $ = {
  __name: 'setting',
  setup(m) {
    const i = V(!0);
    const a = V({ type: 0, web_bq: [], app_bq: [] });
    const y = N({});

    const U = async () => {
      await _.confirm('确定要保存吗？');
      a.value.type = 1;
      const s = await z.saveSetting(a.value);
      s.error ? _.msgError(s.msg) : (_.msgSuccess(s.msg), x.back());
    };

    const k = () => {
      x.back();
    };

    (async () => {
      const s = await z.saveSetting(a.value);
      if (s.data && s.data.web_bq.length && s.data.app_bq.length) {
        a.value.web_bq = s.data.web_bq;
        a.value.app_bq = s.data.app_bq;
      }
      i.value = !1;
    })();

    return (s, o) => {
      const p = n("el-text");
      const f = n("el-button");
      const d = n("el-form-item");
      const v = n("el-row");
      const r = n("el-radio");
      const q = n("el-radio-group");
      const b = n("el-input");
      const w = n("la-uploader");
      const S = n("el-form");
      const B = n("el-card");
      const C = R("loading");
      return c(), j("div", G, [E((c(), O(B, {class: "border-none", shadow: "never"}, {default: l(() => [e(S, {ref: "formRef", model: a.value, "label-width": "100px", rules: y}, {default: l(() => [e(v, {class: "mb-4", justify: "space-between"}, {default: l(() => [e(p, {class: "mx-1", tag: "b"}, {default: l(() => [u(" 去版权配置（修改后需刷新网页生效） ")]), _:1}), e(d, null, {default: l(() => [e(f, {size: "large", icon: "CloseBold", onClick: k}, {default: l(() => [u("取消")]), _:1}), e(f, {size: "large", type: "primary", icon: "Select", onClick: U}, {default: l(() => [u("保存")]), _:1})]), _:1})]), _:1}), e(v, {justify: "space-between"}, {default: l(() => [g("div", L, [e(p, {tag: "b"}, {default: l(() => [u(" 后台")]), _:1}), e(d, {label: "状态", prop: "web_bq0"}, {default: l(() => [e(q, {modelValue: a.value.web_bq[0], "onUpdate:modelValue": o[0] || (o[0] = t => a.value.web_bq[0] = t)}, {default: l(() => [e(r, {label: "0", border: ""}, {default: l(() => [u("不启用")]), _:1}), e(r, {label: "1", border: ""}, {default: l(() => [u("启用")]), _:1})]), _:1}, 8, ["modelValue"])]), _:1}), e(d, {label: "名称", class: "flex-1", prop: "web_bq1"}, {default: l(() => [e(b, {size: "large", modelValue: a.value.web_bq[1], "onUpdate:modelValue": o[1] || (o[1] = t => a.value.web_bq[1] = t), placeholder: "请填写"}, null, 8, ["modelValue"])]), _:1}), e(d, {label: "LOGO", class: "flex-1", prop: "web_bq2"}, {default: l(() => [e(w, {modelValue: a.value.web_bq[2], "onUpdate:modelValue": o[2] || (o[2] = t => a.value.web_bq[2] = t)}, null, 8, ["modelValue"])]), _:1}), e(d, {label: "简介", class: "flex-1", prop: "web_bq3"}, {default: l(() => [e(b, {size: "large", modelValue: a.value.web_bq[3], "onUpdate:modelValue": o[3] || (o[3] = t => a.value.web_bq[3] = t), placeholder: "请填写"}, null, 8, ["modelValue"]), e(p, {size: "small"}, {default: l(() => [u("登录页展示")]), _:1})]), _:1}), e(d, {label: "版权", class: "flex-1", prop: "web_bq4"}, {default: l(() => [e(b, {size: "large", modelValue: a.value.web_bq[4], "onUpdate:modelValue": o[4] || (o[4] = t => a.value.web_bq[4] = t), placeholder: "请填写"}, null, 8, ["modelValue"]), e(p, {size: "small"}, {default: l(() => [u("全部页面底部和登录页展示")]), _:1})]), _:1}), e(d, {label: "官网", class: "flex-1", prop: "web_bq5"}, {default: l(() => [e(b, {size: "large", modelValue: a.value.web_bq[5], "onUpdate:modelValue": o[5] || (o[5] = t => a.value.web_bq[5] = t), placeholder: "请填写"}, null, 8, ["modelValue"]), e(p, {size: "small"}, {default: l(() => [u("登录页展示")]), _:1})]), _:1}), e(d, {label: "数据面板11111", class: "flex-1", prop: "web_bq6"}, {default: l(() => [e(b, {size: "large", type: "textarea", modelValue: a.value.web_bq[6], "onUpdate:modelValue": o[6] || (o[6] = t => a.value.web_bq[6] = t), autosize: {minRows: 4}, placeholder: "请填写"}, null, 8, ["modelValue"]), e(p, {size: "small"}, {default: l(() => [u("数据面板右下角模块展示，启用后不填写则整个模块隐藏")]), _:1})]), _:1}), e(d, {label: "icp备案展示", class: "flex-1", prop: "web_bq7"}, {default: l(() => [e(b, {size: "large", modelValue: a.value.web_bq[7], "onUpdate:modelValue": o[7] || (o[7] = t => a.value.web_bq[7] = t), placeholder: "请填写"}, null, 8, ["modelValue"]), e(p, {size: "small"}, {default: l(() => [u("登录页展示")]), _:1})]), _:1}), e(d, {label: "公安备案展示", class: "flex-1", prop: "web_bq8"}, {default: l(() => [e(b, {size: "large", modelValue: a.value.web_bq[8], "onUpdate:modelValue": o[8] || (o[8] = t => a.value.web_bq[8] = t), placeholder: "请填写"}, null, 8, ["modelValue"]), e(p, {size: "small"}, {default: l(() => [u("登录页展示")]), _:1})]), _:1})]), g("div", P, [e(p, {tag: "b"}, {default: l(() => [u("小程序：")]), _:1}), e(d, {label: "状态", prop: "app_bq0"}, {default: l(() => [e(q, {modelValue: a.value.app_bq[0], "onUpdate:modelValue": o[9] || (o[9] = t => a.value.app_bq[0] = t)}, {default: l(() => [e(r, {label: "0", border: ""}, {default: l(() => [u("不显示")]), _:1}), e(r, {label: "1", border: ""}, {default: l(() => [u("显示")]), _:1})]), _:1}, 8, ["modelValue"])]), _:1}), e(d, {label: "图标", class: "flex-1", prop: "app_bq1"}, {default: l(() => [e(w, {modelValue: a.value.app_bq[1], "onUpdate:modelValue": o[10] || (o[10] = t => a.value.app_bq[1] = t), width: "60", height: "60"}, null, 8, ["modelValue"])]), _:1}), e(d, {label: "名称", class: "flex-1", prop: "app_bq2"}, {default: l(() => [e(b, {size: "large", modelValue: a.value.app_bq[2], "onUpdate:modelValue": o[11] || (o[11] = t => a.value.app_bq[2] = t), placeholder: "请填写"}, null, 8, ["modelValue"])]), _:1}), e(d, {label: "简介", class: "flex-1", prop: "app_bq3"}, {default: l(() => [e(b, {size: "large", modelValue: a.value.app_bq[3], "onUpdate:modelValue": o[12] || (o[12] = t => a.value.app_bq[3] = t), placeholder: "请填写"}, null, 8, ["modelValue"])]), _:1}), e(d, {label: "关于我们", class: "flex-1", prop: "app_bq4"}, {default: l(() => [e(b, {size: "large", modelValue: a.value.app_bq[4], "onUpdate:modelValue": o[13] || (o[13] = t => a.value.app_bq[4] = t), placeholder: "请填写"}, null, 8, ["modelValue"]), e(p, {size: "small"}, {default: l(() => [u("网址链接需添加至微信小程序后台的web-view合法域名")]), _:1})]), _:1})])]), _:1})]), _:1}, 8, ["model", "rules"])]), _:1})), [[C, i.value]])])}}}; export { $ as default };